package cn.soqi.gui;/**
 * Created by user on 2017/5/8.
 */

import javax.swing.filechooser.FileFilter;
import java.io.File;

/**
 * 文件类型筛选
 *
 * @author brozer
 * @email 798121446@qq.com
 * @create 2017-05-08 15:46
 */
class ZipFileFilter extends FileFilter {
    public String getDescription() {
        return "*.zip";
    }
    public boolean accept(File file) {
        String name = file.getName();
        return file.isDirectory() || name.toLowerCase().endsWith(".zip");  // 仅显示目录和zip文件
    }
}